The present invention relates to a particularly advantageous process for preparing 1-alkyl-, in particular 1,3-dialkyl-pyrazole-5-carboxylic esters, from 2,4-diketocarboxylic esters and alkylhydrazines, where some or all of the 2,4-diketocarboxylic ester may be employed in the form of its enolate and some of the alkylhydrazine may be employed in the form of an alkylhydrazinium salt.
It is known to prepare 1-alkyl-pyrazole-5-carboxylic esters by reacting 2,4-diketocarboxylic esters and alkylhydrazines with each other. This gives isomer mixtures which generally contain predominantly the isomer which is undesired here, which then necessitates a complicated separation process and keeps the yield of the desired isomer low. Thus, reaction of ethyl 2, 4-dioxo-pentanecarboxylate, which is initially charged, with methylhydrazine gives a 1:1 mixture of 1,5-dimethyl-pyrazole-3-carboxylate and the corresponding 2,5-dimethyl isomer (Austr. J. Chem. 36, 135-147 (1983)). Other authors report even more unfavorable ratios of 35:65 (Chem. Ber. 59, 1282 (1926)), which were confirmed in comparative laboratory experiments, for this reaction. The same authors obtained even worse results (isomer ratio 15:85) with analogous etherified enols, for example with O-ethyl acetone oxalate and methylhydrazine.
EP-A 029 363 also describes the synthesis of N-alkyl-substituted pyrazolecarboxylic esters having long alkyl radicals from diketo ester enolate which is initially charged and alkylhydrazine. However, the pyrazole which is isolated in moderate yields is again not the desired pyrazole, since the N-alkyl substituent and the carboxyl group are in 1,3-position and not, as desired, in 1,5-position. In these reactions, either the free alkylhydrazines are reacted with diketo ester which is initially charged, or the sodium enolate of the diketo ester and an alkylhydrazinium salt are initially charged and the hydrazine is liberated with basic compounds (such as sodium hydroxide or sodium carbonate) from the hydrazinium salt.
According to EP-A 854 142, 1-alkyl-pyrazole-5-carboxylic esters are prepared by reacting the enolate of a 2,4-diketocarboxylic ester in the presence of a solvent, for example an alcohol, with an alkylhydrazinium salt. The alkylhydrazinium salt has to be prepared from alkylhydrazine using an acid in the presence of an alcohol. Here, the isomer ratios are favorable, but the amount of undesired isomer is not insignificant and the yield is therefore still not optimal.
There is therefore still a need for a process for the selective preparation of 1-alkyl-pyrazole-5-carboxylic esters in which considerably less of the corresponding 1,3-isomer is formed than in the known processes.
This invention, accordingly, provides a process for preparing 1-alkyl-pyrazole-5-carboxylic esters of the formula (I) 
in which
R1 and R4 independently of one another each represent straight-chain or branched, optionally halogen-substituted C1-C6-alkyl, C3-C7-cycloalkyl or optionally substituted C7-C12-aralkyl and
R2 and R3 independently of one another each represent hydrogen, straight-chain or branched, optionally halogen-substituted C1-C6-alkyl, optionally halogen-substituted C3-C7-cycloalkyl or optionally substituted C7-C12-aralkyl,
characterized in that a 2,4-diketo ester of the formula 
xe2x80x83in which
R2, R3 and R4 are each as defined in formula (I),
and/or an enolate thereof is reacted
with an alkylhydrazine of the formula
R1xe2x80x94NHxe2x80x94NHxe2x80x83xe2x80x83(III),
xe2x80x83in which
R1 is as defined in formula (I),
and/or a corresponding alkylhydrazinium salt,
if appropriate in the presence of a solvent and/or of water, in such a manner that during at least 90% of the reaction free alkylhydrazine of the formula (III) is present.
C7-C12-aralkyl, preferably benzyl, and C6-C10-aryl (mentioned hereinbelow), preferably phenyl (mentioned hereinbelow), may in each case contain, for example, up to two substituents from the group of the halogen atoms and the C1-C4-alkyl radicals.
Preferred diketo esters of the formula (II) are those where the radicals R2 and R3 independently of one another each represent hydrogen, straight-chain or branched C1-C4-alkyl, C3-C6-cycloalkyl or optionally substituted benzyl, or also those where the radical R4 represents straight-chain or branched C1-C4-alkyl.
Particular preference is given to 2,4-diketo esters of the formula (II) where R2 and R4 each represent C1-C4-alkyl and R3 represents H.
Among the alkylhydrazines of the formula (III), preference is given to those where R1 represents straight-chain or branched C1-C4-alkyl or optionally substituted benzyl.
Diketo esters of the formula (II) can be prepared by a conventional method by condensation of a dialkyl ketone of the formula 
in which
R2 and R3 are each as defined for formula (I),
with an oxalic ester of the formula
R4OOCxe2x80x94COOR4xe2x80x83xe2x80x83(V),
xe2x80x83in which
R4 is as defined for formula (I).
The reaction is carried out in the presence of basic condensing agents, for example alkoxides, and of a solvent. The diketo ester of the formula (II), which is obtained as the enolate, can be liberated from the resulting crude reaction mixture by acidification and can be obtained in pure form by customary methods, for example by extraction with an organic solvent, concentration and distillation (see Organicum, 16th edition, 1976, p.472).
Suitable solvents for the reaction of the dialkyl ketones of the formula (IV) with oxalic esters of the formula (V) are, for example, alcohols such as methanol, ethanol, n-propanol, i-propanol and n-, i-, s- and t-butanol. The alkoxide can be prepared by dissolving an alkali metal or alkaline earth metal in the alcohol which corresponds to the alkoxide.
The diketo ester of the formula (II) is reacted according to the invention with the alkylhydrazine of the formula (III) in such a manner that during at least 90% of the reaction free alkylhydrazine of the formula (III) is present. Preferably, free alkylhydrazine is present during 95 to 100% of the reaction. xe2x80x9cx% of the reactionxe2x80x9d is understood here as meaning that x% of the total diketo ester of the formula (II) which has been employed has been converted.
The most simple manner by which this can be achieved is by initially charging the alkylhydrazine of the formula (III) in an equimolar amount or in excess, if appropriate in a solvent or water, and slowly adding the diketo ester of the formula (II), if appropriate in a solvent. By initially charging the alkylhydrazine of the formula (III), it is ensured that even when stoichiometric amounts of alkylhydrazine and diketo esters are employed, free alkylhydrazine of the formula (III) is present during almost 100% of the reaction.
It is also possible to initially charge a small amount of free alkylhydrazine, for example 10 to 20% by weight of the total amount, and to add simultaneously the remainder of the alkylhydrazine and the diketo ester, both if appropriate in a solvent or water. It is advantageous here to add a small amount of alkylhydrazine first.
Preference is given to using the diketo ester of the formula (II) in the form of an enolate of the formula (VI): 
in which
R2, R3 and R4 are each as defined for formula (I) and
M represents an equivalent of an alkali metal or alkaline earth metal.
If alkylhydrazinium salts are employed, these may correspond to the formula (VII)
[R1NH2xe2x80x94NH2]+Xxe2x88x92xe2x80x83xe2x80x83(VII),
xe2x80x83in which
R1 is as defined for formula (I) and
Xxe2x88x92 represents the anion of an organic or inorganic acid.
Suitable anions Xxe2x88x92 of inorganic acids are, for example, chloride, bromide, fluoride, hydrogen sulfate, dihydrogen phosphate and hydrogen carbonate. Preferred anions Xxe2x88x92 are those of organic acids. In this case, Xxe2x88x92 in particular represents R5COOxe2x88x92, where R5 represents a C1-C10-aliphatic or a C6-C12-aromatic radical, each of which may optionally be substituted. R5 preferably represents formate, acetate, propionate, butyrate or benzoate.
R5 together with the COOxe2x88x92-moiety may also represent an anion of a polybasic organic acid. Examples are anions of oxalic, malonic, succinic, glutaric, adipic, maleic, fumaric, malic, tartaric and citric acid, and they may in each case be mono- or polyanions. Such anions may contain one or more COOxe2x88x92-moieties and if appropriate, additionally also COOH radicals.
In the case of anions of polybasic organic acids, the alkylhydrazine can be employed in equivalent amounts, based on the acid, i.e. in amounts which are equal to the number of acid groups.
In order that the free alkylhydrazine of the formula (III) required according to the invention is present even when alkylhydrazinium salts are employed, it is advantageous to add free alkylhydrazine of the formula (III) to the alkylhydrazinium salt prior to the reaction with the diketo ester or its enolate.
The process according to the invention can be carried out, for example, by metering in a diketo ester enolate of the formula (VI), for example in the form of a crude reaction mixture from the condensation reaction of a ketone of the formula (I) and an oxalic ester of the formula (V), to a mixture of an as equimolar amount as possible of an alkylhydrazinium salt of the formula (VII) which contains a proportion of free alkylhydrazine of the formula (III). By reaction with the alkylhydrazinium salt of the formula (VII), the diketo ester enolate of the formula (VI) forms in situ the free diketo ester of the formula (II) and free alkylhydrazine of the formula (III), which spontaneously react to give the desired pyrazole of the formula (I).
However, it is also possible to add an alkylhydrazinium salt of the formula (VII) in a mixture with a free alkylhydrazine of the formula (III), if appropriate in the presence of a solvent or water, to a diketo ester of the formula (II) which has been initially charged, or to an enolate thereof of the formula (VI). Thus, it is ensured that diketo ester which is liberated from the enolate always encounters free alkylhydrazine.
If solvents and/or water are used, the total amounts of solvent and water employed are generally chosen so that stirrable suspensions or solutions are present. The total amount of solvent plus water per mole of reaction mixture may, for example, be n corresponds to the valency of M.
The dialkyl ketone and the alkoxide are preferably employed in approximately equimolar amounts. Altogether, it is possible to employ, for example, from 0.9 to 1.1 mol of oxalic ester of the formula (V) and from 0.9 to 1.1 mol of alkoxide, for example of the formula (VIII), per 0.9 to 0.99 mol of dialkyl ketone of the formula (IV).
If the alkylhydrazinium salt of the formula (VII) is prepared from an alkylhydrazine of the formula (III) and a carboxylic acid, for example of the formula R5COOH, it is advantageous to choose the molar ratio of the two starting materials such that, after formation of the alkylhydrazinium salt, for example from 1 to 200 mol % of free alkylhydrazine of the formula (III) are present.
An excess of carboxylic acid, for example of the formula R5COOH, is only then advantageous if the alkoxide, for example from the preparation of a diketo ester enolate of the formula (VI), is present in excess. The excess alkoxide can then be neutralized with the excess acid.
The reaction temperatures for the reaction according to the invention may be, for example, between xe2x88x9220 and +100xc2x0 C. Preference is given to from 0 to 80xc2x0 C., particularly preferably from 0 to 50xc2x0 C. These temperatures may also be maintained during any subsequent stirring.
The reaction time (=time for mixing the reaction partners+subsequent stirring time) may, for example, be between 0.5 and 12 hours. It is preferably between 1 and 8 hours, particularly preferably between 2 and 5 hours.
The following 2,4-diketo ester components are preferably employed for the process according to the invention: ethyl 2,4-diketopentanecarboxylate as sodium, lithium, between 100 and 2000 ml. This amount is preferably from 200 to 1000 ml, particularly preferably from 250 to 500 ml. The total amount of solvent plus water may comprise, for example, from 10 to 60% by weight, preferably from 15 to 40% by weight, of water.
It is advantageous to use such an amount of free alkylhydrazine of the formula (III) and, if appropriate, such an amount of alkylhydrazinium salt of the formula (VII) for the process according to the invention that, after the reaction has ended, for example from 0.1 to 200 mol % of free alkylhydrazine of the formula (III) are still present (based on the diketo ester employed or its enolate). This amount is particularly preferably from 1 to 50 mol %, in particular from 5 to 20 mol %.
If the preparation of the diketo ester enolate of the formula (VI) is carried out in the presence of alkoxide, the amount of alkoxide may vary within wide limits. Preference is given to using at least 90 mol % of alkoxide, based on the ketone of the formula (IV).
If the diketo ester of the formula (II) is prepared in a prior step as described above from a dialkyl ketone of the formula (IV) and an oxalic ester of the formula (V), their molar ratios may also vary. Preference is given to carrying out the reaction with a slight excess of oxalic ester, for example with a substoichiometric quantity of in each case from 1 to 10 mol % of dialkyl ketone of the formula (IV) and alkoxide of the formula
M(OR6)nxe2x80x83xe2x80x83(VIII),
in which
M is as defined for formula (VI),
R6 represents C1-C4-alkyl and
potassium or magnesium enolate salts, ethyl 2,4-diketohexanecarboxylate, ethyl 2,4-diketoheptanecarboxylate, ethyl 2,4-diketooctanecarboxylate and ethyl 2,4-diketo-3-ethylpentanecarboxylate (in each case in the form of their sodium, lithium, potassium or magnesium enolate salts) or methyl, n-propyl, i-propyl and n-, i-, s- and t-butyl esters of the abovementioned diketocarboxylic acids in the form of the above-mentioned enolate salts.
Preferred alkylhydrazines of the formula (III) are methyl-, ethyl-, n-propyl-, i-propyl-, n-butyl-, t-butyl-, benzyl- and n-pentylhydrazine.
A general embodiment of the process according to the invention is illustrated below using the reaction of ethyl 2,4-diketoheptanecarboxylate with methylhydrazine as an example:
Initially, the sodium salt of ethyl 2,4-diketoheptanecarboxylate is prepared from 2-pentanone and diethyl oxalate using sodium ethoxide in ethanol as auxiliary base, in a similar way to known procedures (see, for example, Organicum, 19th ed., p. 490 (1993)). This solution is kept at 50xc2x0 C. to prevent precipitation of the enolate and, over a period of 1 hour, added to a mixture of methylhydrazine and acetic acid (molar ratio 1.1:1) which has been prepared beforehand. Stirring is continued, the excess ethanol is distilled off and the mixture is mixed with toluene and, if appropriate, with more water. To improve phase separation, it is possible, if appropriate, to add a suitable surfactant, for example an alkanesulfonate, and/or to increase the ion concentration in the aqueous phase, for example by addition of a salt, such as an alkali metal halide. The toluene phase is then separated off and the aqueous phase is extracted two more times with toluene. The organic phases are combined and then re-extracted with water. The water may, if appropriate, contain an acid and/or a salt. The toluene solution of the crude pyrazole is subsequently concentrated by distilling off the solvent, and the residue is subjected to fractional distillation under reduced pressure. The two isomeric pyrazoles can be isolated in pure form without any major separation costs.
The process according to the invention yields the desired 1-alkyl-pyrazole-5-carboxylic esters generally in amounts of more than 8 times, frequently in 10 times the amount or even higher amounts, in each case based on the undesired wrong isomer (=1-alkyl-pyrazole-3-carboxylic ester).
It is extremely surprising that the process according to the invention has such an extraordinarily favorable effect on the regioselectivity of the formation of the desired 1-alkyl-pyrazole-5-carboxylic esters. If, during the reaction, no free alkylhydrazine of the formula (III) is present, as is the case in the prior art (see also Comparative Example), the undesired isomers are obtained in a higher amount than the desired isomers of the formula (I), or the desired isomer is obtained in a considerably lower excess. It has to be mentioned as being particularly surprising that even a small excess of free alkylhydrazine effects the substantial inversion of the isomer distribution shown.
1-Alkyl-pyrazole-5-carboxylic esters of the formula (I) are usefull intermediates for preparing pharmaceutically active compounds having vasoactive and/or spasmolytic action (see EP published specification 463 756, EP published specification 526 004, WO 94/28902 and DE published specification 19 27 429), and also for preparing pesticides having insecticidal and acaricidal action (see JP published specification 89-114 466).
The invention is further described in the following illustrative examples in which all parts and percentages are by weight unless otherwise indicated.